Added exception for unknown image function. Fixed error.