fix issues with inserting