Fixed bash/sh compatibility bug