Fix problem with ~