Fixed NPE and removed delays