fixing issue 312