fixes #53
fixes #54
fixes #56 (it is a temporary solution and probably needs further check)