Fixing 1285 and 1287