fix for TypeError

Maybe this error occurs only in fallback mode. I use elfinder with rails connector.