fixed undefined server error