fixed some errors to compile on mobile