More bug fixes - Now working ok