fixed several exceptions
adjusted build files