Fixed compiler errors

Closes https://github.com/PistonDevelopers/piston/issues/308
Closes https://github.com/PistonDevelopers/piston/issues/309
Closes https://github.com/PistonDevelopers/piston/issues/310
Merge pull request #314 from bvssvni/master

Fixed compiler errors