Fix for S4 crashes