Some bugxfixing