bracket bug fix and alert message