Added bug fix #5