fixing the mobile logic