Fixed bug in department parsing