Bugfixing on warnings