Correcting nil call for vector