*Removed ensuring there is a target in getTarget(), which solves a crash when debugging during runtime