Fixed some impt bugs