bug fix. lock creation before first possible call