crash attempting to insert bars

update fixed the crash