- fixed some bugs from last merge