fix integer problems