Fix for #34

which also fixes /part and /leave command not working.

Fix for #34

I did some changes because I had to sync before commiting :P

Fix for #34 (5th attempt)