some error bugfix