Fixing bug with missing attributes