resolve undefined bug on iPad 1. Closes #646 and #425