fixed null pointer when connectiong using fb