some fixes and compiling pdf