attempt at fixing a bug.