Fixed editor position and logic errors