better solution for previous bugfix