Fixes #744. Also adds android 3 support