Apprently that sleep command was necessary