Fixed various bugs created up when merging the restful-api branch