#249 bug fixed finally