Removed faulty script and fixed wrong call to check