fixed the bug, restoring functionality