fixed some declaration errors