Fixed bugs in Xavi's pull request