Fix some issues

https://github.com/DrKLO/Telegram/issues/468
https://github.com/DrKLO/Telegram/issues/464
https://github.com/DrKLO/Telegram/issues/394
https://github.com/DrKLO/Telegram/issues/334