fixes errors in images, pages and projects controller