clearing debugs and bugfixing