Bug Fix

fixes #4 (callback)
fixes #5 (loop after crash)