Fix for the crash on exit for older Samsung models

I committed this to master by mistake, this was reverted and placed onto this branch for review.