detect hostos, some cleanups