vlib: fix out of memory issue