added fix for #503 issue