plot bugs fixed