fixing the code for unix backend