fixing issue 540