fix errors caused by misplacement