Updated with bug fix