fixed bug with departments