main

Fixed some bugs