Fixed some minor issues with entities