Solving blank space problem