Added a guard to prevent the autoload bug as mentioned by @cebe.