Fixed bugs, see main project