Fix #304 and #281

not needed