Fixed unknown variable errors