Fixed parsing problem with regex