Fixed one bug with allocation.