#21 fixed some crashes when orientation of the device is changing