Having problem interfacing LCD along with PS/2 keyboard to Arduino Leonardo.

Firstly, when I'm testing only PS/2 libraries with leonardo on my system it worked pretty good.But when I try to upload only LCD program to board it works but it wont upload program on to the board next time i try to(even though it shows "done uploading").So I need to go to another PC and program any other program on it and then it start to work on my PC again(only once if it is a LCD program again). I thought there is some problem with LCD interfacing on my board.But when i tried LCD program on my friends PC it worked.However when I tried PS/2 libraries on friends system it didn't work. Well what I want to say is, =>PS/2 library worked on my system(Which I tried first.) but not LCD library(Which I tried second). =>LCD library worked on my FRIENDS system(Which I tried first.) but not PS/2 library(Which I tried second). What I want to know is, =>Does it happens only to my Leonardo or to the others also? =>Do there will be same problem with Arduino UNO?

PS: Pins I used for LCD are (13,12,11,10,9,8); Pins for PS/2 keyboard are (2,3);