Bugfix & added alert

Oops.