Fix small problem with space detect