fix for regexp and some tests for that