fixed a bug reported by Saba (thank you)