Fixed a few bugs, also compiled against stable SM 1.5.0