Fix #249, #250, #252 - @Ellega can you verify ?