bug fix - all working now