bug fixing and testing for the alert option