okay, fixed a few more border conditions...