fixed regex bugs