fix the bed parser, still not great but will do for now