various fixes as stated in milkypostman/melpa#2310