finally, fixed 'fix_p_spaces()' (really, i promise)