#311 bug fixed