Fixed lapply warnings