Fixed a bug in SWT handler