Potentially fixing #250 and #299