Fixed some minor bugs to get everything to compile with Sage 5.6