fix version check, cleanup