fixed several things