Fix bug which may occur if dimensions don't exist