misc bugfix