Fixed and tested stuff