fixed functions for unix