minor fix to be compatible with more scripts