Fixed plot bug