Added check in case generator is not initialized