Bugfixing for last new function