Fix sticky issues

Thanks goes to @mAiNiNfEcTiOn for a lot of help given and @fbessadok for reporting the bugs.