Make bitmap rendering work correctly again
Fix for crash