fixed double entry bug