make can_transform actually do something

Up to now these functions never waited for a transform.
The sleep loop's condition was broken and the sleep code itself
as well.
Merge pull request #59 from v4hn/hotfix-can-transform

make can_transform actually do something