Fixing NOT NULL bug