made some fixes to attribute changed model