Fix for https://code.google.com/p/shellinabox/issues/detail?id=202