fixed a bug in regex