Moved callback to work as expected