fixes for insert statement