Fixed minor bugs fixed