hopefully fixed #42 overlay class cast exception on jolla phones
(cherry picked from commit 556132f)
updated version