fixed bugs and added baseImageController tests