Fixed NullReferencedException