Index: uspace/srv/hid/fb/ega.c
===================================================================
--- uspace/srv/hid/fb/ega.c	(revision 4f14e1f8802a61a8c882aefc9d36f523cc9fa40f)
+++ uspace/srv/hid/fb/ega.c	(revision 4a4c8bcf0ce34cbf901b7d7d1d02ef84f5b04d48)
@@ -52,7 +52,9 @@
 #include <io/screenbuffer.h>
 #include <sys/types.h>
-
 #include "ega.h"
 #include "main.h"
+
+// FIXME: remove this header
+#include <kernel/ipc/ipc_methods.h>
 
 #define MAX_SAVED_SCREENS  256
@@ -291,6 +293,5 @@
 		int retval;
 		
-		switch (IPC_GET_IMETHOD(call)) {
-		case IPC_M_PHONE_HUNGUP:
+		if (!IPC_GET_IMETHOD(call)) {
 			client_connected = 0;
 			async_answer_0(callid, EOK);
@@ -298,4 +299,7 @@
 			/* Exit thread */
 			return;
+		}
+		
+		switch (IPC_GET_IMETHOD(call)) {
 		case IPC_M_SHARE_OUT:
 			/* We accept one area for data interchange */
Index: uspace/srv/hid/fb/fb.c
===================================================================
--- uspace/srv/hid/fb/fb.c	(revision 4f14e1f8802a61a8c882aefc9d36f523cc9fa40f)
+++ uspace/srv/hid/fb/fb.c	(revision 4a4c8bcf0ce34cbf901b7d7d1d02ef84f5b04d48)
@@ -59,12 +59,13 @@
 #include <byteorder.h>
 #include <io/screenbuffer.h>
-
 #include "font-8x16.h"
 #include "fb.h"
 #include "main.h"
 #include "ppm.h"
-
 #include "pointer.xbm"
 #include "pointer_mask.xbm"
+
+// FIXME: remove this header
+#include <kernel/ipc/ipc_methods.h>
 
 #define DEFAULT_BGCOLOR  0xf0f0f0
@@ -1620,6 +1621,5 @@
 			continue;
 		
-		switch (IPC_GET_IMETHOD(call)) {
-		case IPC_M_PHONE_HUNGUP:
+		if (!IPC_GET_IMETHOD(call)) {
 			client_connected = false;
 			
@@ -1630,5 +1630,7 @@
 			/* Exit thread */
 			return;
+		}
 		
+		switch (IPC_GET_IMETHOD(call)) {
 		case FB_PUTCHAR:
 			ch = IPC_GET_ARG1(call);
Index: uspace/srv/hid/fb/main.c
===================================================================
--- uspace/srv/hid/fb/main.c	(revision 4f14e1f8802a61a8c882aefc9d36f523cc9fa40f)
+++ uspace/srv/hid/fb/main.c	(revision 4a4c8bcf0ce34cbf901b7d7d1d02ef84f5b04d48)
@@ -28,5 +28,5 @@
 
 #include <ipc/services.h>
-#include <ipc/ns.h>
+#include <ns.h>
 #include <sysinfo.h>
 #include <async.h>
Index: uspace/srv/hid/fb/serial_console.c
===================================================================
--- uspace/srv/hid/fb/serial_console.c	(revision 4f14e1f8802a61a8c882aefc9d36f523cc9fa40f)
+++ uspace/srv/hid/fb/serial_console.c	(revision 4a4c8bcf0ce34cbf901b7d7d1d02ef84f5b04d48)
@@ -52,4 +52,7 @@
 #include "serial_console.h"
 
+// FIXME: remove this header
+#include <kernel/ipc/ipc_methods.h>
+
 #define MAX_CONTROL 20
 
@@ -344,6 +347,5 @@
 		int retval;
 		
-		switch (IPC_GET_IMETHOD(call)) {
-		case IPC_M_PHONE_HUNGUP:
+		if (!IPC_GET_IMETHOD(call)) {
 			client_connected = 0;
 			async_answer_0(callid, EOK);
@@ -351,4 +353,7 @@
 			/* Exit thread */
 			return;
+		}
+		
+		switch (IPC_GET_IMETHOD(call)) {
 		case IPC_M_SHARE_OUT:
 			/* We accept one area for data interchange */
