* Fixed crash when encountered malformed images
* Internal Code Optimization