Bugfixing and polishing last commit.