recent refactor bugfix