Correct bugs found on test