fixing regex bug