Fixed MCrypt issues with malloc