How I wasted hours debugging a silly mistake