Fixed bug in xlim and ylim