Issues #299, #320 and #335 are fixed